#!/bin/bash

openocd -d0 -f "rpi.cfg" -c "transport select swd" -f "nrf51.cfg" -c "init" -c "reset halt" -c "nrf51 mass_erase" -c "program CODE.ESMAX 0 verify" -c "program UICR_ES 0x10001000 verify" -c "reset" -c "exit"

echo "- ! - ! - ! - ! - ! - ! - ! - ! -"
echo "Look at doc folder for schematics and for result comparsion"
echo "В папке doc лежит схема и пример положительного результата"
echo "- ! - ! - ! - ! - ! - ! - ! - ! -"
echo "thanks to ed01, @nickkee, @playmean"
echo "Спасибо ed01, @nickkee, @playmean"
